// 封装localstorage对token对象的三个操作
// 保存，获取，删除
// 消除魔法字符串
const HISTORY_NAME = 'my-history'
// 保存
export const saveHistory = (historyArr) => {
  localStorage.setItem(HISTORY_NAME, JSON.stringify(historyArr))
}
// 获取
export const getHistory = () => {
  return JSON.parse(localStorage.getItem(HISTORY_NAME))
}
// 删除
export const delHistory = () => {
  localStorage.removeItem(HISTORY_NAME)
}
